package cn.wolfcode.qo;

import cn.wolfcode.enums.BusinessReportEnums;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class BusinessReportQueryObject extends QueryObject{
        private String typeSn = BusinessReportEnums.BUSINESS.name();
        private Long businessId;
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        private Date startTime;
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        private Date endTime;
        private Integer statusType;

        public  String getByName(){
                return this.typeSn;
        }

        public String getTypeSn(){
                return BusinessReportEnums.valueOf(this.typeSn).getSql();
        }
}
